import request from '@/utils/request'

export function getnetconfig (params) {
  return request({
    url: '/back/netconfiguration/getById',
    method: 'post',
    data: params
  })
}

export function updatenetconfig (params) {
  return request({
    url: '/back/netconfiguration/saveOrUpdate',
    method: 'post',
    data: params
  })
}

export function getNetWorkCardList (params) {
  return request({
    url: '/back/netconfiguration/getNetWorkCardList',
    method: 'post',
    data: params
  })
}

export function networkDetection (params) {
  return request({
    url: '/back/netconfiguration/networkDetection',
    method: 'post',
    data: params
  })
}
export function getNetworkDetection() {
  //return  "ws://" + location.host+process.env.VUE_APP_API_BASE_URL+'/websocket'
  return  "ws://" + location.host+'/websocket'
}
